<template>
  <div>
    <el-card class="box-card">
      <el-row>
        <el-col :span="5" class="labClass">
          <div class="grid-content bg-purple">
            <span>供应商名称:</span>
          </div>
        </el-col>
        <el-col :span="16">
          <div class="grid-content bg-purple-light">
            <span >{{supplierName}}</span>
          </div>
        </el-col>
        <el-col :span="3" class="labClass">
          <div class="grid-content bg-purple">
          </div>
        </el-col>
      </el-row>
      <br>
      <p/>
      <el-row>
        <el-col :span="5" class="labClass">
          <div class="grid-content bg-purple">
            <span>负责人:</span>
          </div>
        </el-col>
        <el-col :span="16">
          <div class="grid-content bg-purple-light">
            <span >{{supplierUser}}</span>
          </div>
        </el-col>
        <el-col :span="3" class="labClass">
          <div class="grid-content bg-purple">
          </div>
        </el-col>
      </el-row>
      <p/>
      <br>
      <p/>
      <el-row>
        <el-col :span="5" class="labClass">
          <div class="grid-content bg-purple">
            <span>负责人电话:</span>
          </div>
        </el-col>
        <el-col :span="16">
          <div class="grid-content bg-purple-light">
            <span >{{supplierPhone}}</span>
          </div>
        </el-col>
        <el-col :span="3" class="labClass">
          <div class="grid-content bg-purple">
          </div>
        </el-col>
      </el-row>
      <p/>
      <br>
      <p/>
      <el-row>
        <el-col :span="5" class="labClass">
          <div class="grid-content bg-purple">
            <span>供应商地址:</span>
          </div>
        </el-col>
        <el-col :span="16">
          <div class="grid-content bg-purple-light">
            <span>{{supplierAddress}}</span>
          </div>
        </el-col>
        <el-col :span="3" class="labClass">
          <div class="grid-content bg-purple">
          </div>
        </el-col>
      </el-row>
      <p/>
      <br>
      <p/>
      <el-row>
        <el-col :span="5" class="labClass">
          <div class="grid-content bg-purple">
            <span>经营范围:</span>
          </div>
        </el-col>
        <el-col :span="16">
          <div class="grid-content bg-purple-light">
            <span>{{supplierScope}}</span>
          </div>
        </el-col>
        <el-col :span="3" class="labClass">
          <div class="grid-content bg-purple">
          </div>
        </el-col>
      </el-row>
      <p/>

      <el-button type="success" @click="returns">返回</el-button>
    </el-card>

  </div>
</template>

<script>
export default {
  name: "findBySupplier",
  data() {
    return {
      supplierId:0,
      supplierName: '',
      supplierUser: '',
      supplierPhone: '',
      supplierAddress: '',
      supplierScope: ''
    }
  },
  methods:{
    returns(){
      location.href="/index"
    },
    init(id){
      this.supplierId=id;
      let params = {
        supplierId:id
      }
      this.$axios.get('drp/supplier/findById', {params: params}).then(
          r => {
            this.supplierName=r.data.supplierName
            this.supplierUser=r.data.supplierUser
            this.supplierPhone=r.data.supplierPhone
            this.supplierAddress=r.data.supplierAddress
            this.supplierScope=r.data.supplierScope
          }
      )
    }
  }
}
</script>

<style scoped>

</style>